//
//  BKCollectionReusableView.m
//  XPhoto
//
//  Created by baboy on 2019/8/16.
//  Copyright © 2019 baboy. All rights reserved.
//

#import "BKCollectionReusableView.h"

@implementation BKCollectionReusableView
- (void)setContentView:(UIView *)contentView{
    if (_contentView == contentView) {
        return;
    }
    if (_contentView && [_contentView superview]) {
        [_contentView removeFromSuperview];
    }
    _contentView = contentView;
    contentView.frame = self.bounds;
    [self addSubview:contentView];
}
- (void)layoutSubviews{
    [super layoutSubviews];
    if (self.contentView) {
        self.contentView.frame = self.bounds;
    }
}
@end
